home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_UMINNgopher.idb / usr / freeware / src / gopher_1.12 / gopherd / ext.h.z / ext.h
C/C++ Source or Header  |  1997-09-09  |  2KB  |  59 lines

  1. /********************************************************************
  2.  * $Author: drich $
  3.  * $Revision: 1.1 $
  4.  * $Date: 1995/10/03 04:08:27 $
  5.  * $Source: /proj/freeware1.0/gopher1.12/src/gopherd/RCS/ext.h,v $
  6.  * $Status: $
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: ext.h
  14.  * Header file and access methods for filename extension routines
  15.  *********************************************************************
  16.  * Revision History:
  17.  * $Log: ext.h,v $
  18.  * Revision 1.1  1995/10/03  04:08:27  drich
  19.  * gopher 1.2 check-in
  20.  *
  21.  * Revision 1.1  1992/12/10  23:13:27  lindner
  22.  * gopher 1.1 release
  23.  *
  24.  *
  25.  *********************************************************************/
  26.  
  27.  
  28. #ifndef EXT_H
  29. #define EXT_H
  30.  
  31. #include "DAarray.h"
  32. #include "STRstring.h"
  33. #include "boolean.h"
  34.  
  35. /****************************************************
  36.  * A structure for mapping filenames to gopher types, and G+types
  37.  */
  38.  
  39. struct Ext_struct {
  40.      char   Objtype;
  41.      String *GplusType;
  42.      String *Prefix;
  43.      String *ext;
  44. };
  45.  
  46. typedef struct Ext_struct Ext;
  47. typedef DynArray ExtArray;
  48.  
  49. #define ExtgetEntry(a,b) (Ext *)(DAgetEntry((DynArray*)a,b))
  50. #define ExtArrDestroy(a) (DAdestroy(a))
  51.  
  52. ExtArray *ExtArrayNew();
  53. void      ExtAdd(/*extarr, objtype, gplustype, prefix, fileext */);
  54. void      ExtGet(/*extarr, fileext, objtype, gplustype, prefix */);
  55. boolean   ExtProcessLine(/*extarr, inputline*/);
  56.  
  57. #endif /** EXT_H **/
  58.  
  59.